import http from "./httpInstance";

// 实时视频流
function getPointUrl(params) {
  return http({
    method: "post",
    // url: '//integrated-workbench/v1/eventcenter/busizeventdetail/playRuntimeCameraUrl',
    url: "/integrated-workbench/v1/enforcement/playruntimecameraurl",
    data: params,
  });
}

// 获取回放视频流
function getPointUrlBack(params) {
  return http({
    method: "post",
    // url: '//integrated-workbench/v1/eventcenter/busizeventdetail/playRuntimeCameraUrl',
    url: "/integrated-workbench/v1/enforcement/playruntimecameraurl/playbackcameraurl",
    data: params,
  });
}

// 获取点位列表
function getPointList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/devicecombox",
    data: params,
  });
}

// 获取所属社区
function getSqList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/communitycombox",
    data: params,
  });
}

// 获取处置人员
function getczryList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/membercombox",
    data: params,
  });
}

// 获取事件列表

function getEventList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/busizeventlist",
    data: params,
  });
}

// 确定分派

function dispatchEvent(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/confirmassign",
    data: params,
  });
}

// 确认完成

function completeEvent(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/confirmhandle",
    data: params,
  });
}

// 查询事件详情

function getEventDetail(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/busizeventdetail",
    data: params,
  });
}

// 登录

function login(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/eventcenter/authentication/login",
    data: params,
  });
}

// 获取最新事件--外层列表

function getzxsjList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/list",
    data: params,
  });
}

// 获取待办

function getzdbList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/list",
    data: params,
  });
}

// 获取数据总览:队长

function getDataTotalList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/statistics",
    data: params,
  });
}

// 获取一键取证

function getOneKeyCheck(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/oneclickevidence",
    data: params,
  });
}

// 远程喊话

function talkToseppk(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/talkurl",
    data: params,
  });
}

// 获取事件类型

function getEventTypeList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/eventdefinecombox",
    data: params,
  });
}

// 获取处置状态

function getczztList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/eventstatuscombox",
    data: params,
  });
}

// 获取事件等级

function getsjjdList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/eventclasscombox",
    data: params,
  });
}

// 获取事件来源

function getslzyList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/enforcement/eventsourcecombox",
    data: params,
  });
}

// 获取巡查待办
function getxcdbList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/publicsafety/workstation/inspecttodo",
    data: params,
  });
}

// 获取最新事件
function getzxsjdbList(params) {
  return http({
    method: "post",
    url: "/integrated-workbench/v1/publicsafety/workstation/pealerttodo",
    data: params,
  });
}

// 进度条。查看详情---下载的流
function geteventarchivingdownload(params) {
  return http({
    method: "get",
    url: "/integrated-workbench/v1/enforcement/eventarchivingdownload",
    params: params, // 使用 params 属性传递查询参数
    responseType: "blob", // 设置响应类型为 blob 以便处理文件流
  });
}
// 进度条。查看详情---预览url
function geteventarchivingpreview(params) {
  return http({
    method: "post",
    url: "integrated-workbench/v1/enforcement/eventarchivingpreview",
    data: params,
  });
}
// 开始对讲+结束对讲
function gettalkurl(params) {
  return http({
    method: "post",
    url: "integrated-workbench/v1/enforcement/talkurl",
    data: params,
  });
}

export {
  getzxsjdbList,
  getxcdbList,
  getslzyList,
  getsjjdList,
  getczztList,
  getEventTypeList,
  talkToseppk,
  getOneKeyCheck,
  getDataTotalList,
  getzdbList,
  getzxsjList,
  getPointUrlBack,
  login,
  getEventDetail,
  completeEvent,
  dispatchEvent,
  getEventList,
  getczryList,
  getPointUrl,
  getPointList,
  getSqList,
  geteventarchivingdownload,
  geteventarchivingpreview,
  gettalkurl,
};
